Imports CrystalDecisions.CrystalReports.Engine

Public Class FrmCrHangHoa
    Private trang As Integer
    Private customerReport As ReportDocument

    Public Sub setTrang(ByVal s As Integer)
        trang = s
    End Sub
    Private Sub FrmCrHangHoa_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ConfigureCrystalReports()
    End Sub

    Private Sub ConfigureCrystalReports()
        Dim sqlQuery As String = "SELECT * FROM tbl_hanghoa"
        'Dim reportPath = Application.StartupPath & "\" & "crHangHoa.rpt"
        Dim reportPath = Application.StartupPath & "\" & "crHangHoa_HosoGDP.rpt"
        customerReport = New ReportDocument()
        customerReport.Load(reportPath)
        customerReport.SetDataSource(moduleReportConfig.GetDataTable(sqlQuery))
        customerReport.SetParameterValue("trang", trang)
        Me.CrNganhangview.ReportSource = customerReport
    End Sub



End Class
